/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-04-15
 * Time: 11:38
 */

//输出整数的每一位
import java.util.Scanner;

public class TestNode {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();

        while(a != 0) {
            int n = a%10;
            System.out.print(n);
            a = a / 10 ;
        }
    }
}
